﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using GameServerLibrary;
namespace GameServer
{
    class Program
    {
        static String ServerName;
        static void Main(string[] args)
        {
            //开始服务
            GameServerLibrary.GameServer _GameServer = new GameServerLibrary.GameServer();
            ServerName = "GameServer 1 >";
            _GameServer.Start("http://192.168.1.100:9001/WcfFIFA/DBServer/DBServer");
           
            Console.Write("\r\n" + ServerName);
            while (true)
            {
                String CommandStr = Console.ReadLine();
                switch(CommandStr)
                {
                    case "exit":
                        return;
                    case "db":
                        _GameServer.GetDBServerStatus(GetDBServerStatusCallback);
                        break;
                }
                Console.Write("\r\n" + ServerName);
            }
        }


        static void GetDBServerStatusCallback(int DBServerId, int DBServerStatus)
        {
            Console.WriteLine("\r\n"+DBServerId.ToString() + "," + DBServerStatus.ToString());
            Console.Write(ServerName);
        }
    }
}
